package com.xuedongzhilian.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 试卷题目实体类
 * </p>
 *
 * @author 学动智联团队
 * @since 2025-10-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_exam_question")
public class ExamQuestion implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 试卷ID
     */
    private Long paperId;

    /**
     * 题目序号
     */
    private Integer questionNumber;

    /**
     * 题目类型：1-单选，2-多选，3-判断
     */
    private Integer questionType;

    /**
     * 题目内容
     */
    private String content;

    /**
     * 选项A
     */
    private String optionA;

    /**
     * 选项B
     */
    private String optionB;

    /**
     * 选项C
     */
    private String optionC;

    /**
     * 选项D
     */
    private String optionD;

    /**
     * 选项E
     */
    private String optionE;

    /**
     * 选项F
     */
    private String optionF;

    /**
     * 正确答案
     */
    private String correctAnswer;

    /**
     * 题目解析
     */
    private String explanation;
    
    // 添加无参构造函数
    public ExamQuestion() {}
    
    // 添加全参构造函数
    public ExamQuestion(Long id, Long paperId, Integer questionNumber, Integer questionType, 
                       String content, String optionA, String optionB, String optionC, 
                       String optionD, String optionE, String optionF, 
                       String correctAnswer, String explanation) {
        this.id = id;
        this.paperId = paperId;
        this.questionNumber = questionNumber;
        this.questionType = questionType;
        this.content = content;
        this.optionA = optionA;
        this.optionB = optionB;
        this.optionC = optionC;
        this.optionD = optionD;
        this.optionE = optionE;
        this.optionF = optionF;
        this.correctAnswer = correctAnswer;
        this.explanation = explanation;
    }
}